package mypackage.forfun;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.ViewFlipper;

public class AndroidFunActivity extends Activity {
	
	private TextView textview=null;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.playwithmenu);
	textview = (TextView) findViewById(R.id.textView1);
		

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		new MenuInflater(getApplication()).inflate(R.menu.testmenu, menu);
		return (super.onCreateOptionsMenu(menu));
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		
		
		textview.setText(item.getTitle().toString());
		return (super.onOptionsItemSelected(item));
		
	}


}
